package com.mtable.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * MMenu entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "m_menu", catalog = "mtable")
public class MMenu implements java.io.Serializable {

	// Fields

	private Integer menuId;
	private String menuName;
	private String actionUrl;
	private Integer parentId;
	private Short isLeaf;
	private String iconPic;

	// Constructors

	/** default constructor */
	public MMenu() {
	}

	/** minimal constructor */
	public MMenu(Short isLeaf) {
		this.isLeaf = isLeaf;
	}

	/** full constructor */
	public MMenu(String menuName, String actionUrl, Integer parentId,
			Short isLeaf, String iconPic) {
		this.menuName = menuName;
		this.actionUrl = actionUrl;
		this.parentId = parentId;
		this.isLeaf = isLeaf;
		this.iconPic = iconPic;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "menu_id", unique = true, nullable = false)
	public Integer getMenuId() {
		return this.menuId;
	}

	public void setMenuId(Integer menuId) {
		this.menuId = menuId;
	}

	@Column(name = "menu_name")
	public String getMenuName() {
		return this.menuName;
	}

	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}

	@Column(name = "action_url")
	public String getActionUrl() {
		return this.actionUrl;
	}

	public void setActionUrl(String actionUrl) {
		this.actionUrl = actionUrl;
	}

	@Column(name = "parent_id")
	public Integer getParentId() {
		return this.parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	@Column(name = "isLeaf", nullable = false)
	public Short getIsLeaf() {
		return this.isLeaf;
	}

	public void setIsLeaf(Short isLeaf) {
		this.isLeaf = isLeaf;
	}

	@Column(name = "iconPic", length = 20)
	public String getIconPic() {
		return this.iconPic;
	}

	public void setIconPic(String iconPic) {
		this.iconPic = iconPic;
	}

}